{extend name="base/base" /}
{block name="title"}管理员管理{/block}
{block name="content"}

<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 管理员管理 <span
                class="c-gray en">&gt;</span> 编辑管理员 <a class="btn btn-success radius r"
                                                       style="line-height:1.6em;margin-top:3px"
                                                       href="javascript:location.replace(location.href);" title="刷新"><i
                    class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="Hui-article">
        <article class="cl pd-40">
            <form action="/admin/user/{$userData.id}" method="post" class="form form-horizontal"
                  id="form-admin-role-add">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>管理员名称：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="{$userData.username}" placeholder="请输入管理员名称"
                               required id="roleName"
                               name="username">
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>输入密码(不修改留空)：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="password" class="input-text" value="" placeholder="输入密码"
                               id="roleName"
                               name="password">
                        <input type="hidden" name="_method" value="PUT">
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>重复密码(不修改留空)：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="password" class="input-text" value="" placeholder="重复密码"
                               id="roleName"
                               name="password2">
                    </div>
                </div>

                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>用户组</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        {volist name="authgroups" id="authgroup"}
                        <label class="checkbox checkbox-inline">
                            <input class="custom-checkbox" name="group_id[]" type="checkbox" data-toggle="checkbox"
                                   value="{$authgroup.id}"
                                   {if condition="in_array($authgroup['id'],$ownGroups)" }
                                   checked
                                   {/if}
                            >
                            <span class="icons">
                    <span class="icon-unchecked"></span>
                    <span class="icon-checked"></span>
                    </span>
                            {$authgroup.title}
                        </label>
                        {/volist}
                    </div>
                </div>

                <div class="row cl">
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                        <button type="submit" class="btn btn-success radius" id="admin-role-save"
                                name="admin-role-save"><i class="icon-ok"></i> 确定
                        </button>
                    </div>
                </div>
            </form>
        </article>
    </div>
</section>
{/block}
